The ARROW procedure draws one or more vectors with arrow heads.
This routine is written in the IDL language. Its source code can be found in the file arrow.pro in the lib subdirectory of the IDL distribution.
ARROW, X0, Y0, X1, Y1 [, /DATA | , /NORMALIZED] [, HSIZE=length] [, COLOR=index] [, HTHICK=value] [, /SOLID] [, THICK=value]
Arrays or scalars containing the coordinates of the tail end of the vector or vectors. Coordinates are in DEVICE coordinates unless otherwise specified.
Arrays or scalars containing the coordinates of the arrowhead end of the vector or vectors. X1 and Y1 must have the save number of elements as X0 and Y0.
Set this keyword if vector coordinates are DATA coordinates.
Set this keyword if vector coordinates are NORMALIZED coordinates.
Use this keyword to set the length of the lines used to draw the arrowhead. The default is 1/64th the width of the display (!D.X_SIZE / 64.). If the HSIZE is positive, the value is assumed to be in device coordinate units. If HSIZE is negative, the arrowhead length is set to the vector length * ABS(HSIZE). The lines are separated by 60 degrees to make the arrowhead.
The color of the arrow. The default is the highest color index.
The thickness of the arrowheads. The default is 1.0.
Set this keyword to make a solid arrow, using polygon fills, looks better for thick arrows.
The thickness of the body. The default is 1.0.
Draw an arrow from (100,150) to (300,350) in DEVICE units:
ARROW, 100, 150, 300, 350
Draw a sine wave with arrows from the line Y = 0 to SIN(X/4):
X = FINDGEN(50)
Y = SIN(x/4)
PLOT, X, Y
ARROW, X, REPLICATE(0,50), X, Y, /DATA
Pre 4.0 |
Introduced |